<template>
  <uni-popup ref="popup" type="center" style="z-index: 910" :is-mask-click="false">
    <view class="box column">
      <view class="center" style="justify-content: center;height:270rpx;background-color:#4771F2;width:100%;">
        <image :src="unlisted" mode="" style="width:180rpx;height:207rpx;"></image>
      </view>
      <view class="column bot">
        <view class="column">
          <text>您当前还未绑定账户</text>
          <text style="margin-top: 10rpx;">请先进行账户绑定操作</text>
        </view>
        <view @click="redirectTo('register/login')">前去绑定</view>
      </view>
    </view>
  </uni-popup>
</template>

<script setup lang="ts">
  import { redirectTo } from '@/utils/navigator';
  import { unlisted } from '@/utils/Statics';
  import { getDriverID } from '@/stores/driverID';
  import { ref } from 'vue';
  const popup = ref(null)
  setTimeout(() => {
    if (!getDriverID()) {
      open()
    }
  }, 500)

  function open() {
    popup.value.open();
  }
  function close() {
    popup.value.close();
  }
  defineExpose({
    open,
    close,
  });
</script>

<style scoped lang="less">
  .box {
    width: 600rpx;
    border-radius: 5px;
    overflow: hidden;
    .bot{
      width:100%;
      background-color: #fff;
      height:358rpx;
      justify-content: space-around;
      view:nth-of-type(2){
        width: 340rpx;
        height: 68rpx;
        background: #3699FF;
        border-radius: 34rpx;
        text-align: center;
        line-height: 68rpx;
        color: #fff;
      }
    }
  }
</style>